Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: truncate agent pod annotation so scheduler doesn't fail when annoation limit is exceeded #3314

Merged
merged 11 commits into from
Dec 11, 2024

Conversation

AustinAbro321
Copy link
Contributor

Description

When the annotation name created by the agent is too long the scheduler errors. This fixes that by truncating the annotation name to be equal to the 63 character limit.

https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set

Fixes #3313

Checklist before merging

Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
@AustinAbro321 AustinAbro321 requested review from a team as code owners December 10, 2024 20:02
Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 549703a
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/6758c765950fd20008d80b62

Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
@AustinAbro321 AustinAbro321 changed the title fix: agent breaks scheduler annoation name limit when container name is too long fix: truncate agent pod annotation so scheduler doesn't fail when the container name exceeds the limit Dec 10, 2024
@AustinAbro321 AustinAbro321 changed the title fix: truncate agent pod annotation so scheduler doesn't fail when the container name exceeds the limit fix: truncate agent pod annotation so scheduler doesn't fail when annoation limit is exceeded Dec 10, 2024
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/internal/agent/hooks/pods.go 76.66% <100.00%> (+2.91%) ⬆️

... and 3 files with indirect coverage changes

mkcp
mkcp previously approved these changes Dec 10, 2024
Copy link
Contributor

@mkcp mkcp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - nice turnaround on getting a tested fix ready for review

Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Copy link
Member

@phillebaba phillebaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🌹

@AustinAbro321 AustinAbro321 added this pull request to the merge queue Dec 11, 2024
Merged via the queue into main with commit 75340a8 Dec 11, 2024
26 checks passed
@AustinAbro321 AustinAbro321 deleted the annotation-long-pod-name branch December 11, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zarf.dev/original-image annotation can prevent pod scheduling
4 participants